package huas.ant.mapper;

import huas.ant.entity.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminMapper {
    /**
     * 查询是否存在该用户账号
     */
    @Select("select * from admin where admin_account = #{adminAccount}")
    public Admin findByAdminAccount(String adminAccount);

    /**
     * 注册添加管理员信息
     */
    @Insert("insert into admin (admin_account,password) values (#{adminAccount},#{password})")
    public void register(Admin admin);


}
